﻿
using Xacml.Core;
using System;
using System.Xml;

namespace Xacml.Core.Policy
{
  public class ResourcesElement : ResourcesElementReadWrite
  {
    public override TargetItemCollectionReadWrite ItemsList
    {
      get
      {
        return (TargetItemCollectionReadWrite) new TargetItemCollection(base.ItemsList);
      }
      set
      {
        throw new NotSupportedException();
      }
    }

    public ResourcesElement(bool anyItem, TargetItemCollectionReadWrite items, XacmlVersion version)
      : base(anyItem, items, version)
    {
    }

    public ResourcesElement(XmlReader reader, XacmlVersion version)
      : base(reader, version)
    {
    }

    protected override TargetItemBaseReadWrite CreateTargetItem(XmlReader reader)
    {
      return (TargetItemBaseReadWrite) new ResourceElement(reader, this.SchemaVersion);
    }
  }
}
